package com.wei.czz.common.enums.rabbitMQ;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * Created by IntelliJ IDEA.
 *
 * @author wei
 * date: 2022-03-06 11:37:04
 * className: BlogCommentMessageDict 博客评论消息字典枚举类
 * version: 2.0
 * description:
 */
@Getter
@AllArgsConstructor
public enum BlogCommentMessageEnum {

    /*
        属性值字典值
     */
    // 消息类型
    LIKE_TYPE(0, "点赞数");

    /**
     * 字典值
     */
    private final Integer value;

    /**
     * 字典值的描述信息
     */
    private final String name;

    /**
     * 获取消息类型的描述信息
     * @return 描述信息
     */
    public static BlogCommentMessageEnum getType(Integer value) {
        for (BlogCommentMessageEnum type : values()) {
            if (type.value.equals(value)) {
                return type;
            }
        }
        return null;
    }
}
